﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bankeren.Engine.Cards
{
    /// <summary>
    /// Represents a players hand. It's just a <see cref="List<Card>"/> with some extra methods.
    /// </summary>
    public class Hand : List<Card>
    {
        /// <summary>
        /// Check if the hand contains a card in the given suit.
        /// </summary>
        /// <param name="suit">The suit to check for.</param>
        /// <returns>True if the hand contains a card in the given suit, false otherwise.</returns>
        public bool ContainsSuit(Suit suit)
        {
            foreach (Card card in this)
                if (card.Suit == suit)
                    return true;
            return false;
        }

        public Hand(List<Card> cards) : base(cards)
        {
            
        }

        public Hand()
            : base()
        {

        }
    }
}
